package cn.virens.web.components.shiro.token;

import java.io.Serializable;

import cn.virens.common.StringUtil;

public class ChannelResult implements Serializable {
	private static final long serialVersionUID = -3993759940293936259L;

	private String uuid;
	private String password;

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setPasswordSrc(String password) {
		this.password = StringUtil.md5(password);
	}

	public boolean vaild() {
		return StringUtil.isNoneEmpty(uuid, password);
	}

	public static boolean vaild(ChannelResult result) {
		return result != null && result.vaild();
	}

}
